package cn.cgl.alpacaweather.util;

import okhttp3.OkHttpClient;
import okhttp3.Request;

/**
 * <b color="#F50F20">Created by gunleychan on 2017/3/18 15:56.
 * <br/>
 * </b>
 * 网络访问工具
 */

public class HttpUtil {

    /**
     * 发送OKHTTP网络访问请求
     *
     * @param url
     * @param callback
     */
    public static void sendOkHttpRequest(String url, okhttp3.Callback callback) {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder().url(url).build();
        client.newCall(request).enqueue(callback);
    }
}
